package com.ciallo.stock.mapper;

import com.ciallo.stock.pojo.domain.InnerMarketDomain;
import com.ciallo.stock.pojo.entity.StockMarketIndexInfo;
import io.swagger.annotations.ApiModel;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 42088
* @description 针对表【stock_market_index_info(国内大盘数据详情表)】的数据库操作Mapper
* @createDate 2025-02-22 23:06:07
* @Entity com.ciallo.stock.pojo.entity.StockMarketIndexInfo
*/
@ApiModel(description = "针对表【stock_market_index_info(国内大盘数据详情表)】的数据库操作Mapper")
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);

    /**
     * 根据指定的时间点查询指定大盘对应的数据
     * @param curDate 指定时间点
     * @param mCodes 大盘编码集合
     * @return
     */
    List<InnerMarketDomain> getMarketInfo(@Param("curDate") Date curDate, @Param("mCodes") List<String> mCodes);

    List<Map> getStockTradeVol(@Param("markedIds") List<String> markedIds,
                               @Param("startTime") Date startTime,
                               @Param("endTime") Date endTime);

    /**
     * 批量插入大盘数据
     * @param entities  大盘实体对象集合
     * @return
     */
    int insertBatch(@Param("entities") ArrayList<StockMarketIndexInfo> entities);
}
